object frmShowOrder2Ship: TfrmShowOrder2Ship
  Left = 0
  Top = 0
  ClientHeight = 528
  ClientWidth = 882
  Caption = #35746#21333#36716#22791#36135
  OldCreateOrder = False
  MonitoredKeys.Keys = <>
  PixelsPerInch = 96
  TextHeight = 13
  object UniToolBar1: TUniToolBar
    Left = 0
    Top = 0
    Width = 882
    Height = 45
    Hint = ''
    ButtonHeight = 45
    ButtonWidth = 60
    ShowCaptions = True
    TabOrder = 0
    ParentColor = False
    Color = clBtnFace
    object tbSearch: TUniToolButton
      Left = 0
      Top = 0
      Hint = ''
      ImageIndex = 10
      Caption = #26597#35810
      TabOrder = 4
      OnClick = tbSearchClick
    end
    object UniToolButton3: TUniToolButton
      Left = 60
      Top = 0
      Width = 8
      Hint = ''
      Style = tbsSeparator
      Caption = 'UniToolButton3'
      TabOrder = 5
    end
    object tbOK: TUniToolButton
      Left = 68
      Top = 0
      Hint = ''
      ImageIndex = 22
      Caption = #30830#23450
      TabOrder = 2
      OnClick = tbOKClick
    end
    object UniToolButton2: TUniToolButton
      Left = 128
      Top = 0
      Width = 8
      Hint = ''
      Style = tbsSeparator
      Caption = 'UniToolButton2'
      TabOrder = 3
    end
    object tbExit: TUniToolButton
      Left = 136
      Top = 0
      Hint = ''
      ImageIndex = 41
      Caption = #36864#20986
      TabOrder = 1
      OnClick = tbExitClick
    end
  end
  object UniPanel1: TUniPanel
    Left = 0
    Top = 45
    Width = 882
    Height = 75
    Hint = ''
    Align = alTop
    TabOrder = 1
    Caption = ''
    object edPartno: TUniEdit
      Left = 80
      Top = 10
      Width = 120
      Hint = ''
      Text = ''
      TabOrder = 1
    end
    object UniLabel1: TUniLabel
      Left = 26
      Top = 15
      Width = 48
      Height = 13
      Hint = ''
      Caption = #20135#21697#32534#21495
      TabOrder = 2
    end
    object edPartDesc2: TUniEdit
      Left = 300
      Top = 10
      Width = 120
      Hint = ''
      Text = ''
      TabOrder = 3
    end
    object UniLabel2: TUniLabel
      Left = 26
      Top = 45
      Width = 48
      Height = 13
      Hint = ''
      Caption = #20135#21697#21517#31216
      TabOrder = 4
    end
    object UniLabel3: TUniLabel
      Left = 246
      Top = 15
      Width = 48
      Height = 13
      Hint = ''
      Caption = #35268#26684#22411#21495
      TabOrder = 5
    end
    object UniLabel4: TUniLabel
      Left = 258
      Top = 45
      Width = 30
      Height = 13
      Hint = ''
      Caption = #25551#36848'3'
      TabOrder = 6
    end
    object edPartDesc1: TUniEdit
      Left = 80
      Top = 40
      Width = 120
      Hint = ''
      Text = ''
      TabOrder = 7
    end
    object edPartDesc3: TUniEdit
      Left = 300
      Top = 40
      Width = 120
      Hint = ''
      Text = ''
      TabOrder = 8
    end
  end
  object UniPanel2: TUniPanel
    Left = 0
    Top = 120
    Width = 882
    Height = 408
    Hint = ''
    Align = alClient
    TabOrder = 2
    Caption = ''
    object UniDBGrid1: TUniDBGrid
      Left = 1
      Top = 1
      Width = 880
      Height = 406
      Hint = ''
      DataSource = dsQuery
      ReadOnly = True
      LoadMask.Message = 'Loading data...'
      Align = alClient
      TabOrder = 1
      OnDblClick = UniDBGrid1DblClick
      Columns = <
        item
          FieldName = 'ord_no'
          Title.Alignment = taCenter
          Title.Caption = #35746#21333#21495
          Width = 100
        end
        item
          FieldName = 'ord_date'
          Title.Alignment = taCenter
          Title.Caption = #35746#21333#26085#26399
          Width = 100
        end
        item
          FieldName = 'wh_name'
          Title.Alignment = taCenter
          Title.Caption = #20179#24211
          Width = 80
        end
        item
          FieldName = 'whd_name'
          Title.Alignment = taCenter
          Title.Caption = #20179#20301
          Width = 80
        end
        item
          FieldName = 'ordd_part_no'
          Title.Alignment = taCenter
          Title.Caption = #20135#21697#32534#21495
          Width = 100
        end
        item
          FieldName = 'ordd_part_desc1'
          Title.Alignment = taCenter
          Title.Caption = #20135#21697#21517#31216
          Width = 200
        end
        item
          FieldName = 'ordd_part_desc2'
          Title.Alignment = taCenter
          Title.Caption = #35268#26684#22411#21495
          Width = 100
        end
        item
          FieldName = 'ord2ship_qty'
          Title.Alignment = taCenter
          Title.Caption = #21487#22791#36135#25968#37327
          Width = 80
          ReadOnly = True
        end
        item
          FieldName = 'stk_val_qty'
          Title.Alignment = taCenter
          Title.Caption = #24211#23384#21487#29992#37327
          Width = 80
          ReadOnly = True
        end
        item
          FieldName = 'ordd_qty'
          Title.Alignment = taCenter
          Title.Caption = #35746#21333#25968#37327
          Width = 64
        end
        item
          FieldName = 'shipd_flags1_qty'
          Title.Alignment = taCenter
          Title.Caption = #22791#36135#24050#38144#21806
          Width = 80
          ReadOnly = True
        end
        item
          FieldName = 'shipd_flags0_qty'
          Title.Alignment = taCenter
          Title.Caption = #22791#36135#26410#38144#21806
          Width = 80
          ReadOnly = True
        end
        item
          FieldName = 'ord_site_flags'
          Title.Alignment = taCenter
          Title.Caption = #32452#32455
          Width = 50
        end
        item
          FieldName = 'ord_cli_no'
          Title.Alignment = taCenter
          Title.Caption = #23458#25143#32534#21495
          Width = 100
        end
        item
          FieldName = 'ord_cli_name'
          Title.Alignment = taCenter
          Title.Caption = #23458#25143#21517#31216
          Width = 150
        end
        item
          FieldName = 'ordd_part_desc3'
          Title.Alignment = taCenter
          Title.Caption = #25551#36848'3'
          Width = 100
        end
        item
          FieldName = 'stk_qty'
          Title.Alignment = taCenter
          Title.Caption = #24211#23384#25968#37327
          Width = 80
        end
        item
          FieldName = 'stk_ship_qty'
          Title.Alignment = taCenter
          Title.Caption = #24050#22791#36135#25968#37327
          Width = 80
        end
        item
          FieldName = 'ord_adds_province'
          Title.Alignment = taCenter
          Title.Caption = #30465
          Width = 80
        end
        item
          FieldName = 'ord_adds_locality'
          Title.Alignment = taCenter
          Title.Caption = #24066
          Width = 80
        end
        item
          FieldName = 'ord_adds_county'
          Title.Alignment = taCenter
          Title.Caption = #21306
          Width = 80
        end
        item
          FieldName = 'ord_adds_address'
          Title.Alignment = taCenter
          Title.Caption = #22320#22336
          Width = 200
        end
        item
          FieldName = 'ord_adds_attn'
          Title.Alignment = taCenter
          Title.Caption = #32852#31995#20154
          Width = 80
        end
        item
          FieldName = 'ord_adds_tel'
          Title.Alignment = taCenter
          Title.Caption = #30005#35805
          Width = 80
        end
        item
          FieldName = 'ord_adds_mobile'
          Title.Alignment = taCenter
          Title.Caption = #31227#21160#30005#35805
          Width = 80
        end
        item
          FieldName = 'ord_adds_fax'
          Title.Alignment = taCenter
          Title.Caption = #20256#30495
          Width = 80
        end
        item
          FieldName = 'ord_adds_email'
          Title.Alignment = taCenter
          Title.Caption = #37038#31665
          Width = 80
        end
        item
          FieldName = 'ord_adds_class'
          Title.Alignment = taCenter
          Title.Caption = #22320#22336#31867#22411
          Width = 50
        end>
    end
  end
  object zqOrder: TZQuery
    Connection = UniMainModule.zDB
    SQL.Strings = (
      'select'
      #9'ord_snowflake,'
      #9'ord_site_flags,'
      '  ord_no,'
      '  ord_date,'
      '  ord_cli_snowflake,'
      '  ord_cli_no,'
      '  ord_cli_name,'
      ''
      '  ord_adds_snowflake,'
      '  ord_adds_province,'
      '  ord_adds_locality,'
      '  ord_adds_county,'
      '  ord_adds_address,'
      '  ord_adds_attn,'
      '  ord_adds_tel,'
      '  ord_adds_mobile,'
      '  ord_adds_fax,'
      '  ord_adds_email,'
      '  ord_adds_class,'
      ''
      #9'ordd_line_snowflake,'
      '  ordd_site_flags,'
      #9'ordd_part_snowflake,'
      #9'ordd_part_no,'
      '  ordd_part_desc1,'
      '  ordd_part_desc2,'
      '  ordd_part_desc3,'
      ''
      #9'ordd_qty,'#9#9#9#9'  -- '#35746#21333#25968#37327
      '  ordd_price,       -- '#21333#20215
      '  ordd_discount,    -- '#20248#24800'(%)'
      '  ordd_price_class, -- '#21333#20215#31867#22411
      ''
      #9'stk_wh_snowflake,'
      #9'wh_name,'
      #9'stk_whd_snowflake,'
      #9'whd_name,'
      '  stk_part_no,'
      '  stk_part_desc1,'
      '  stk_part_desc2,'
      '  stk_part_desc3,'
      '  stk_part_unit,'
      '  stk_part_vol,'
      '  stk_part_wts,'
      #9'stk_qty,'#9#9#9#9'    -- '#24211#23384#25968#37327
      '  stk_ship_qty,       -- '#24050#22791#36135#25968#37327
      
        '  coalesce(stk_qty,0) - coalesce(stk_ship_qty,0) as stk_val_qty,' +
        '   -- '#26377#25928#24211#23384
      ''
      #9'S1.shipd_flags1_qty,'#9#9'-- '#22791#36135#24050#38144#21806
      #9'S0.shipd_flags0_qty,'#9#9'-- '#22791#36135#26410#38144#21806
      ''
      
        #9'ordd_qty - coalesce(shipd_flags1_qty,0) - coalesce(shipd_flags0' +
        '_qty,0) as ord2ship_qty -- '#35746#21333#27424#36135
      'from'
      #9'(select'
      #9#9'ord_snowflake,'
      #9#9'ord_site_flags,'
      '    ord_no,'
      '    ord_date,'
      '    ord_cli_snowflake,'
      '    ord_cli_no,'
      '    ord_cli_name,'
      ''
      '    ord_adds_snowflake,'
      '    ord_adds_province,'
      '    ord_adds_locality,'
      '    ord_adds_county,'
      '    ord_adds_address,'
      '    ord_adds_attn,'
      '    ord_adds_tel,'
      '    ord_adds_mobile,'
      '    ord_adds_fax,'
      '    ord_adds_email,'
      '    ord_adds_class,'
      ''
      #9#9'ordd_line_snowflake,'
      '    ordd_site_flags,'
      #9#9'ordd_part_snowflake,'
      #9#9'ordd_part_no,'
      '    ordd_part_desc1,'
      '    ordd_part_desc2,'
      '    ordd_part_desc3,'
      #9#9'ordd_qty,'
      '    ordd_price,'
      '    ordd_discount,'
      '    ordd_price_class'
      ''
      #9'from ord_mst as M, ordd_det as D'
      #9'where M.ord_snowflake = D.ordd_snowflake'
      #9#9'and M.ord_flags = 7'
      '    and D.ordd_flags = 0'
      #9'order by ord_snowflake, ordd_line_snowflake'
      #9') as O'
      ''
      '    -- '#24211#23384
      #9#9'left join ('
      #9#9#9'select'
      #9#9#9#9'stk_wh_snowflake,'
      '        stk_wh_name,'
      #9#9#9#9'stk_whd_snowflake,'
      '        stk_whd_name,'
      #9#9#9#9'stk_site_flags,'
      #9#9#9#9'stk_part_snowflake,'
      '        stk_part_no,'
      '        stk_part_desc1,'
      '        stk_part_desc2,'
      '        stk_part_desc3,'
      '        stk_part_unit,'
      '        stk_part_vol,'
      '        stk_part_wts,'
      ''
      #9#9#9#9'stk_qty,'
      '        stk_ship_qty,'
      #9#9#9#9'wh_name,'
      #9#9#9#9'whd_name'
      #9#9#9'from stk_mst as STK, wh_mst as WH, whd_det as WHD'
      #9#9#9'where STK.stk_wh_snowflake = WH.wh_snowflake'
      #9#9#9#9'and STK.stk_whd_snowflake = WHD.whd_snowflake'
      #9#9#9'order by stk_wh_snowflake, stk_whd_snowflake'
      #9#9') as S'
      
        #9#9'on (O.ord_site_flags = S.stk_site_flags and O.ordd_part_snowfl' +
        'ake = stk_part_snowflake)'
      ''
      '    -- '#22791#36135#24050#38144#21806
      #9#9'left join ('
      #9#9#9'select'
      #9#9#9#9'shipd_ordd_line_snowflake,'
      #9#9#9#9'sum(shipd_qty) as shipd_flags1_qty'
      #9#9#9'from shipd_det'
      #9#9#9'where shipd_flags = 1'
      #9#9#9'group by shipd_ordd_line_snowflake'
      #9#9#9'order by shipd_ordd_line_snowflake'
      #9#9') as S1'
      #9#9'on (O.ordd_line_snowflake = S1.shipd_ordd_line_snowflake)'
      ''
      '    -- '#22791#36135#26410#38144#21806
      #9#9'left join ('
      #9#9#9'select'
      #9#9#9#9'shipd_ordd_line_snowflake,'
      #9#9#9#9'sum(shipd_qty) as shipd_flags0_qty'
      #9#9#9'from shipd_det'
      #9#9#9'where shipd_flags = 0'
      #9#9#9'group by shipd_ordd_line_snowflake'
      #9#9#9'order by shipd_ordd_line_snowflake'
      #9#9') as S0'
      #9#9'on (O.ordd_line_snowflake = S0.shipd_ordd_line_snowflake)'
      ''
      
        'where ordd_qty - coalesce(shipd_flags1_qty,0) - coalesce(shipd_f' +
        'lags0_qty,0) > 0'
      'order by ord_snowflake, ordd_line_snowflake')
    Params = <>
    Left = 344
    Top = 8
    object zqOrderord_snowflake: TLargeintField
      FieldName = 'ord_snowflake'
      Required = True
    end
    object zqOrderord_site_flags: TIntegerField
      DisplayLabel = #32452#32455
      FieldName = 'ord_site_flags'
    end
    object zqOrderord_no: TWideStringField
      DisplayLabel = #35746#21333#21495
      FieldName = 'ord_no'
      Required = True
      Size = 32
    end
    object zqOrderord_date: TDateField
      DisplayLabel = #35746#21333#26085#26399
      FieldName = 'ord_date'
    end
    object zqOrderord_cli_snowflake: TLargeintField
      FieldName = 'ord_cli_snowflake'
      Required = True
    end
    object zqOrderord_cli_no: TWideStringField
      DisplayLabel = #23458#25143#32534#21495
      FieldName = 'ord_cli_no'
      Required = True
      Size = 16
    end
    object zqOrderord_cli_name: TWideStringField
      DisplayLabel = #23458#25143#21517#31216
      FieldName = 'ord_cli_name'
      Required = True
      Size = 64
    end
    object zqOrderordd_line_snowflake: TLargeintField
      FieldName = 'ordd_line_snowflake'
      Required = True
    end
    object zqOrderordd_part_snowflake: TLargeintField
      FieldName = 'ordd_part_snowflake'
      Required = True
    end
    object zqOrderordd_part_no: TWideStringField
      DisplayLabel = #20135#21697#32534#21495
      FieldName = 'ordd_part_no'
      Required = True
      Size = 24
    end
    object zqOrderordd_part_desc1: TWideStringField
      DisplayLabel = #20135#21697#21517#31216
      FieldName = 'ordd_part_desc1'
      Size = 64
    end
    object zqOrderordd_part_desc2: TWideStringField
      DisplayLabel = #35268#26684#22411#21495
      FieldName = 'ordd_part_desc2'
      Size = 64
    end
    object zqOrderordd_part_desc3: TWideStringField
      DisplayLabel = #25551#36848'3'
      FieldName = 'ordd_part_desc3'
      Size = 64
    end
    object zqOrderordd_qty: TIntegerField
      DisplayLabel = #35746#21333#25968#37327
      FieldName = 'ordd_qty'
      DisplayFormat = '###,#0'
    end
    object zqOrderstk_wh_snowflake: TLargeintField
      FieldName = 'stk_wh_snowflake'
      Required = True
    end
    object zqOrderwh_name: TWideStringField
      DisplayLabel = #20179#24211
      FieldName = 'wh_name'
      Required = True
      Size = 32
    end
    object zqOrderstk_whd_snowflake: TLargeintField
      FieldName = 'stk_whd_snowflake'
      Required = True
    end
    object zqOrderwhd_name: TWideStringField
      DisplayLabel = #20179#20301
      FieldName = 'whd_name'
      Required = True
      Size = 32
    end
    object zqOrderstk_part_no: TWideStringField
      FieldName = 'stk_part_no'
      Required = True
      Size = 24
    end
    object zqOrderstk_part_desc1: TWideStringField
      FieldName = 'stk_part_desc1'
      Required = True
      Size = 64
    end
    object zqOrderstk_part_desc2: TWideStringField
      FieldName = 'stk_part_desc2'
      Size = 64
    end
    object zqOrderstk_part_desc3: TWideStringField
      FieldName = 'stk_part_desc3'
      Size = 64
    end
    object zqOrderstk_part_unit: TWideStringField
      FieldName = 'stk_part_unit'
      Size = 8
    end
    object zqOrderstk_part_vol: TFloatField
      FieldName = 'stk_part_vol'
    end
    object zqOrderstk_part_wts: TFloatField
      FieldName = 'stk_part_wts'
    end
    object zqOrderstk_qty: TIntegerField
      DisplayLabel = #24211#23384#25968#37327
      FieldName = 'stk_qty'
      DisplayFormat = '###,#0'
    end
    object zqOrdershipd_flags1_qty: TLargeintField
      DisplayLabel = #22791#36135#24050#38144#21806
      FieldName = 'shipd_flags1_qty'
      ReadOnly = True
      DisplayFormat = '###,#0'
    end
    object zqOrdershipd_flags0_qty: TLargeintField
      DisplayLabel = #22791#36135#26410#38144#21806
      FieldName = 'shipd_flags0_qty'
      ReadOnly = True
      DisplayFormat = '###,#0'
    end
    object zqOrderord2ship_qty: TLargeintField
      DisplayLabel = #21487#22791#36135#25968#37327
      FieldName = 'ord2ship_qty'
      ReadOnly = True
      DisplayFormat = '###,#0'
    end
    object zqOrderstk_ship_qty: TIntegerField
      DisplayLabel = #24050#22791#36135#25968#37327
      FieldName = 'stk_ship_qty'
      DisplayFormat = '###,#0'
    end
    object zqOrderstk_val_qty: TIntegerField
      DisplayLabel = #24211#23384#21487#29992#37327
      FieldName = 'stk_val_qty'
      ReadOnly = True
      DisplayFormat = '###,#0'
    end
    object zqOrderord_adds_snowflake: TLargeintField
      DisplayLabel = #22320#22336'ID'
      FieldName = 'ord_adds_snowflake'
    end
    object zqOrderord_adds_province: TWideStringField
      DisplayLabel = #30465
      FieldName = 'ord_adds_province'
      Size = 64
    end
    object zqOrderord_adds_locality: TWideStringField
      DisplayLabel = #24066
      FieldName = 'ord_adds_locality'
      Size = 64
    end
    object zqOrderord_adds_county: TWideStringField
      DisplayLabel = #21306
      FieldName = 'ord_adds_county'
      Size = 64
    end
    object zqOrderord_adds_address: TWideStringField
      DisplayLabel = #22320#22336
      FieldName = 'ord_adds_address'
      Size = 256
    end
    object zqOrderord_adds_attn: TWideStringField
      DisplayLabel = #32852#31995#20154
      FieldName = 'ord_adds_attn'
      Size = 32
    end
    object zqOrderord_adds_tel: TWideStringField
      DisplayLabel = #30005#35805
      FieldName = 'ord_adds_tel'
      Size = 32
    end
    object zqOrderord_adds_mobile: TWideStringField
      DisplayLabel = #31227#21160#30005#35805
      FieldName = 'ord_adds_mobile'
      Size = 32
    end
    object zqOrderord_adds_fax: TWideStringField
      DisplayLabel = #20256#30495
      FieldName = 'ord_adds_fax'
      Size = 32
    end
    object zqOrderord_adds_email: TWideStringField
      DisplayLabel = #37038#31665
      FieldName = 'ord_adds_email'
      Size = 32
    end
    object zqOrderord_adds_class: TIntegerField
      DisplayLabel = #22320#22336#31867#22411
      FieldName = 'ord_adds_class'
    end
    object zqOrderordd_price: TFloatField
      DisplayLabel = #21333#20215
      FieldName = 'ordd_price'
      DisplayFormat = '#0.00'
    end
    object zqOrderordd_discount: TFloatField
      DisplayLabel = #20248#24800'(%)'
      FieldName = 'ordd_discount'
      DisplayFormat = '#0.000000'
    end
    object zqOrderordd_price_class: TIntegerField
      DisplayLabel = #21333#20215#31867#22411
      FieldName = 'ordd_price_class'
    end
    object zqOrderordd_site_flags: TIntegerField
      FieldName = 'ordd_site_flags'
    end
  end
  object dsQuery: TDataSource
    DataSet = zqOrder
    Left = 400
    Top = 8
  end
end
